<?php
$str =  '<center>
    <input type="hidden" id="attribute" />
    <input type="hidden" id="base_url" value="'.$plugin_url.'" />
    <table border="0" cellpadding="0" cellspacing="0">
    <tr>
    <td><b>Bedrooms:</b>
    </td>
    <td><select name="bed_room" id="bed_room">
                <option value="0">Any</option>
                <option value="1">1</option>
                <option value="2">2</option>
                <option value="3">3</option>
                <option value="4">4 or more</option>
            </select>
        </td>
    </tr>
    <tr><td><b>Property Type:</b></td><td><select name="type" id="type">
               <option value="1">Any Type</option>
	       <option value="2">Single Family</option>
               <option value="3">Cottage</option>
               <option value="4">Duplex or Condo</option>
            </select>
 </td></tr>
 <tr><td>
    <b>Location:</b></td><td><select name="location" id="location">
               	<option value="1">All Locations</option>
		<option value="2">Barnstable</option>
                <option value="3">Boston</option>
                <option value="4">Bourne</option>
                <option value="5">Brewster</option>
                <option value="6">Cape Cod</option>
                <option value="7">Centerville</option>
                <option value="8">Chatham</option>
                <option value="9">Cohasset</option>
                <option value="10">Cotuit</option>
                <option value="11">Craigville</option>
                <option value="12">Cummaquid</option>
                <option value="13">Dennis</option>
                <option value="14">Falmouth</option>
                <option value="15">Great Island</option>
                <option value="16">Harwich</option>
                <option value="17">Hyannis</option>
                <option value="18">Hyannisport</option>
                <option value="19">Marion</option>
                <option value="20">Marstons Mills</option>
                <option value="21">Mashpee</option>
                <option value="22">Nantucket</option>
                <option value="23">New Seabury</option>
                <option value="24">Orleans</option>
                <option value="25">Osterville</option>
                <option value="26">Other</option>
                <option value="27">Pocasset</option>
                <option value="28">Popponessett</option>
                <option value="29">Sandwich</option>
                <option value="30">Willowbend</option>
                <option value="31">Woods Hole</option>
                <option value="32">Yarmouth</option>
            </select></td></tr>
            <tr><td><b>Price range</b></td><td>
            <b>From:</b><select name="from" id="from" size="1">
							<option value="0">-ANY PRICE-</option>
							<option value="800">$ 800</option>
							<option value="1000">$ 1,000</option>
							<option value="1200">$ 1,200</option>
							<option value="1500">$ 1,500</option>
							<option value="2000">$ 2,000</option>
							<option value="2500">$ 2,500</option>
							<option value="3000">$ 3,000</option>
							<option value="3500">$ 3,500</option>
						</select>&nbsp;<b>To:</b><select name="to" id="to" size="1">
							<option value="0">-ANY PRICE-</option>
							<option value="1000">$ 1,000</option>
							<option value="1200">$ 1,200</option>
							<option value="1500">$ 1,500</option>
							<option value="2000">$ 2,000</option>
							<option value="2500">$ 2,500</option>
							<option value="3000">$ 3,000</option>
							<option value="3500">$ 3,500</option>
							<option value="4000">$ 4,000</option>
							<option value="4500">$ 4,500</option>
							<option value="5000">$ 5,000</option>
							<option value="5500">$ 5,500</option>
						</select>
            </td></tr></table>';
$str .='</center>';
foreach($wpdb->get_results("SELECT * FROM wp_category") as $category):
$str .='<div style="background-color:#CCCCCC;color:white;font-weight: bold;margin-top:10px;">'.$category->name.'</div>
<br />';
foreach($wpdb->get_results("SELECT * FROM wp_attribute WHERE category=".$category->id) as $row){$str .= '<input type="checkbox" name="" value="1" onclick="add_search('.$row->id.',this.checked)" />&nbsp;'.$row->name.'&nbsp;';}
endforeach;
$str .= '<br /><input type="button" name="search" value="Search" onclick="search(1);" />';
$str .='<div id="result"></div>';
?>
